package com.hillstone.component.anno;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

/**
 * @author dengliu
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RedisLock {

    //锁名称
    String lockName() default "";

    //释放时间
    long releaseTime() default 5 * 1000;

    //重试时间
    long tryLockTime() default -1;

    //时间单位
    TimeUnit timeUnit() default TimeUnit.MILLISECONDS;
}
